<section class="content-header">
  <h1>
	组织管理
    <small>组织列表</small>
  </h1>
  <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 系统管理</a></li>
    <li class="active">组织管理</li>
  </ol>
</section>
<section class="content" xmlns:th="http://www.thymeleaf.org">
	<div class="row">
    	<div class="col-xs-12">
        	<div class="box">
        		<div class="box-header">
        			<button type="button" id="addBtn" class="btn btn-success">
						<i class="fa fa-plus icon-right-5"></i>新增
					</button>
        		</div>
            	<div class="box-body">
            		<div class="table-scrollable">
						<table id="treetable" class="table table-hover">
							<thead>
								<tr>
									<th width="40%">组织名称</th>
									<th width="35%">组织编码</th>
									<th width="25%">操作</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="org : ${orgList}" th:id="${org.id}" th:attr="pId=${org.parentId},hasChild=true" th:if="${org.childNum > 0}">
									<td><span controller="true" th:text="${org.orgName}"></span></td>
									<td th:text="${org.orgCode}"></td>
									<td>
										<button type="button" th:onclick="'edit(\''+${org.id}+'\')'" class="btn btn-sm btn-warning right-5">
											<i class="fa fa-edit"></i>
										</button>
										<button type="button" th:onclick="'remove(\''+${org.id}+'\')'" class="btn btn-sm btn-danger">
											<i class="fa fa-trash-o"></i>
										</button>
									</td>
								</tr>
								<tr th:each="org : ${orgList}" th:id="${org.id}" th:attr="pId=${org.parentId}" th:unless="${org.childNum > 0}">
									<td><span controller="true" th:text="${org.orgName}"></span></td>
									<td th:text="${org.orgCode}"></td>
									<td>
										<button type="button" th:onclick="'edit(\''+${org.id}+'\')'" class="btn btn-sm btn-warning right-5">
											<i class="fa fa-edit"></i>
										</button>
										<button type="button" th:onclick="'remove(\''+${org.id}+'\')'" class="btn btn-sm btn-danger">
											<i class="fa fa-trash-o"></i>
										</button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
            	</div>
        	</div>
		</div>
	</div>
	<script th:src="@{/js/system/sysOrg/sysOrgList.js}"></script>
</section>